/**
 * 
 */
package com.biodiversityatlas.harvest.webapp.controller;

import java.util.LinkedList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import com.biodiversityatlas.harvest.model.Datasource;

/**
 * @author timrobertson
 */
public class DatasourceController implements Controller {
	private final Log logger = LogFactory.getLog(DatasourceController.class);
	
	public ModelAndView handleRequest(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		logger.debug("Getting all the data sources");
		List<Datasource> ds = new LinkedList<Datasource>();
		ds.add(new Datasource("http://tapir.org"));
		return new ModelAndView().addObject(ds);
	}

}
